#include "widget.h"
#include "ui_widget.h"
#include<QTimer>
#include<QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    srand(time(0));
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_pushButton_yes_clicked()
{

    qDebug()<<this->frameGeometry().width();
    ui->label->setText("早知如此，何必当初");
    ui->pushButton_no->setEnabled(false);//objname写错了
    QTimer::singleShot(2000,[=](){this->close();});
}

